package com.estate.mapper;

import com.estate.pojo.Room;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface RoomMapper {

	int addRoom(Room room);
	
	int deleteByPrimaryKey(Integer roomId);

	int insert(Room record);

	int insertSelective(Room record);

	Room selectByPrimaryKey(Integer roomId);

	int updateByPrimaryKeySelective(Room record);

	int updateByPrimaryKey(Room record);

	/**
	 * 分页查询房间列表
	 * @param projectId:项目id
	 * @param room_number:房间号
	 * @param ban_name:楼栋名称
	 * @param det_abbreviation:项目简称
	 * @param project_name:项目名称
	 * @return
	 */
	List<Room> selectRoom(@Param("projectId") Integer projectId,@Param("list") String list
						 /*@Param("room_number") String room_number,
						 @Param("ban_name") String ban_name, 
						 @Param("det_abbreviation") String det_abbreviation,
						 @Param("project_name") String project_name*/);
	/**
	 * 根据id进行查询
	 * @param roomId:房间id
	 * @return
	 */
	Room selectRoomById(@Param("roomId") Integer roomId) throws Exception;
	
	/**
	 * 根据房间id进行修改多个表
	 * @param room：房间实体类
	 * @return
	 */
	Integer updateRoomById(Room room)throws Exception;
}